﻿using UnityEngine;
using System.Collections;

public class BulletScript : MonoBehaviour {

	public GameObject pumpum;
	
	void OnCollisionEnter2D()
	{
		GameObject clone;

		//luodaan pumpumista klooni
		clone = Instantiate (pumpum,
                     transform.position,
                     transform.rotation) as GameObject;

		//tuhotaan klooni x sekunnin viiveellä
		Destroy (gameObject, 0.02f);
		Destroy (clone, 2f);

	}
}
